@tailwind base;
@tailwind components;
@tailwind utilities;

/* 自定义全局样式 */
:root {
  font-family: 'Inter', system-ui, Avenir, Helvetica, Arial, sans-serif;
  line-height: 1.5;
  font-weight: 400;

  color-scheme: light dark;

  font-synthesis: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
}

/* 自定义工具类 */
@layer components {
  .game-card {
    @apply bg-white dark:bg-gray-800 rounded-lg shadow-lg p-4 transition-all duration-300 hover:shadow-xl;
  }
  
  .game-button {
    @apply px-6 py-2 rounded-md font-semibold transition-all duration-200 cursor-pointer text-white;
  }
  
  .game-button:disabled {
    @apply opacity-50 cursor-not-allowed;
  }
  
  .game-button.success {
    @apply bg-green-600 hover:bg-green-700;
  }
  
  .game-button.warning {
    @apply bg-yellow-500 hover:bg-yellow-600;
  }
  
  .game-button.danger {
    @apply bg-red-600 hover:bg-red-700;
  }
  
  .game-button.info {
    @apply bg-blue-600 hover:bg-blue-700;
  }
  
  .ingredient-button {
    @apply p-3 m-1 rounded-lg cursor-pointer transition-all duration-200 border-2 border-transparent;
  }
  
  .ingredient-button:hover {
    @apply scale-105 border-primary;
  }
  
  .ingredient-button.selected {
    @apply bg-primary/10 border-primary;
  }
  
  .order-card {
    @apply p-3 m-2 rounded-lg border-2 transition-all duration-200;
  }
  
  .order-card.pending {
    @apply border-gray-300 dark:border-gray-600;
  }
  
  .order-card.in-progress {
    @apply border-blue-400 dark:border-blue-600;
  }
  
  .order-card.delivered {
    @apply border-green-400 dark:border-green-600;
  }
  
  .order-card.failed {
    @apply border-red-400 dark:border-red-600;
  }
  
  .order-card.urgent {
    @apply border-red-500 dark:border-red-700 animate-pulse;
  }
  
  .oven-slot {
    @apply w-full h-24 rounded-lg border-2 flex items-center justify-center m-2 transition-all duration-200;
  }
  
  .oven-slot.empty {
    @apply border-dashed border-gray-300 dark:border-gray-600 bg-gray-50 dark:bg-gray-700/50;
  }
  
  .oven-slot.preparing {
    @apply border-blue-400 dark:border-blue-600 bg-blue-50 dark:bg-blue-900/30;
  }
  
  .oven-slot.baking {
    @apply border-orange-400 dark:border-orange-600 bg-orange-50 dark:bg-orange-900/30;
  }
  
  .oven-slot.baked {
    @apply border-green-400 dark:border-green-600 bg-green-50 dark:bg-green-900/30;
  }
  
  .progress-bar {
    @apply w-full h-2 bg-gray-200 dark:bg-gray-700 rounded-full overflow-hidden;
  }
  
  .progress-bar-fill {
    @apply h-full transition-all duration-1000 ease-linear;
  }
  
  .progress-bar-fill.baking {
    @apply bg-gradient-to-r from-orange-400 to-red-500;
  }
  
  .progress-bar-fill.prepared {
    @apply bg-green-500;
  }
}

/* 动画 */
@keyframes pulse-soft {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.7;
  }
}

.animate-pulse-soft {
  animation: pulse-soft 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}